#include "roles.h"
#include "Simulated_universe.h"
#include "main.h"
#include <iostream>
using namespace std;
extern int achievement1[100], easter_egg[100], opt[100], si_baodi, wu_baodi,
    arms_[100];
;
extern int role_available[100];

// struct character{
//     string name;
//     int arms_[100]
//     int available=-1;
//     int HP;//血量
//     int ATK;//攻击
//     int DEF;//防御
//     int SPD;//速度
//     int CRIT_rate;//暴击
//     int CRIT_DMG;//爆伤
//     int Break_Effect;//击破特工
//     int Outgoing_Healing_Boost;//治疗加成
//     int Max_Energy;//最大能量
//     int Energy_Regeneration_rate;//能量回复效率
//     int Effect_Hit_Rate;//效果命中
//     int Effect_Res;//效果抵抗
// };

// extern int arms_[100];;
// extern int role_available[100];
// struct You{
//     int x,y;
//     int face;
//     string role;
//     character role_status[100];
// };
//

int init_roles() {
    you.role_status[1].name = "Trailblazer";
    you.role_status[2].name = "Raiden Mei";
    you.role_status[3].name = "Firefly";
    you.role_status[2].arms_[1] = 1;
    you.role_status[2].arms_[2] = 0;
    you.role_status[2].HP = 1125;
    you.role_status[2].ATK = 698;
    you.role_status[2].DEF = 436;
    you.role_status[2].SPD = 101;
    you.role_status[2].Max_Energy = 9;
    you.role_status[2].Energy_Regeneration_rate = 0;
    you.role_status[2].Energy = 0;
    you.role_status[2].CRIT_DMG = 200;
    you.role_status[2].CRIT_rate = 50;
    you.role_status[2].Break_Effect = 50;
    you.role_status[2].Effect_Hit_Rate = 50;
    you.role_status[2].Effect_Res = 50;
    return 1;
}

void Role_broad() {
    system("cls");
    printf("角色界面:\n");
    for (int i = 1; i <= 4; i++) {
        if (you.role_status[i].available == 0) {
            // printf("%s :未获得\n\n",you.role_status[i].name);
            cout << you.role_status[i].name << " : 未获得" << endl;
        } else {
            printf("%s :\n", you.role_status[i].name);
            printf("          生命: %05d  攻击: %05d  防御: %05d  速度: %05d  "
                   "暴击率: %05d  暴击伤害: %05d  能量: %05d\n",
                   you.role_status[i].HP, you.role_status[i].ATK,
                   you.role_status[i].DEF, you.role_status[i].SPD,
                   you.role_status[i].CRIT_rate, you.role_status[i].CRIT_DMG,
                   you.role_status[i].Energy);
            printf("          击破特攻: %05d  治疗加成: %05d  最大能量: %05d  "
                   "能量回复效率: %05d  效果命中: %05d  效果抵抗: %05d  \n",
                   you.role_status[i].Break_Effect,
                   you.role_status[i].Outgoing_Healing_Boost,
                   you.role_status[i].Max_Energy,
                   you.role_status[i].Energy_Regeneration_rate,
                   you.role_status[i].Effect_Hit_Rate,
                   you.role_status[i].Effect_Res);
        }
        printf("\n");
    }
    system("pause");
    system("cls");
    // return 1;
}